package com.ruoyi.event.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 帮扶情况业务对象 event_bf_record
 *
 * @author strongme
 * @date 2023-02-04
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class EventBfRecordBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = {EditGroup.class})
    private Long bfRecordId;

    /**
     * 被帮扶人员id
     */
    @NotNull(message = "被帮扶人员id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long userId;

    /**
     * 帮扶人员id
     */
    @NotNull(message = "帮扶人员id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long memberId;

    /**
     * 帮扶时间
     */
    @NotNull(message = "帮扶时间不能为空", groups = {AddGroup.class, EditGroup.class})
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date bfsj;

    /**
     * 帮扶概要
     */
    @NotBlank(message = "帮扶概要不能为空", groups = {AddGroup.class, EditGroup.class})
    private String bfgy;

    /**
     * 帮扶内容
     */
    @NotBlank(message = "帮扶内容不能为空", groups = {AddGroup.class, EditGroup.class})
    private String bfnr;

    /**
     * 图片
     */
    @NotBlank(message = "图片不能为空", groups = {AddGroup.class, EditGroup.class})
    private String img;


}
